
Test edges in graphical models with p-value/AIC value. The models
must iModel
s.
testInEdges (object, edgeMAT=NULL, criterion = "aic", k = 2,
alpha = NULL, headlong = FALSE, details = 1, ...)
testOutEdges(object, edgeMAT=NULL, criterion = "aic", k = 2,
alpha = NULL, headlong = FALSE, details = 1, ...)
An iModel
model object
A p * 2 matrix with edges
Either "aic"
or "test"
(for significance test)
Penalty term when criterion="aic"
. Only k=2 gives
genuine AIC.
Critical value for deeming an edge to be significant/
insignificant. When criterion="aic"
, alpha
defaults to
0; when criterion="test"
, alpha
defaults to 0.05.
If TRUE then testing will stop once a model improvement has been found.
Controls the level of printing on the screen.
Further arguments to be passed on to testdelete
(for testInEdges
) and testadd
(for testOutEdges
).
A matrix.
# NOT RUN {
data(math)
cm1 <- cmod(~me:ve + ve:al + al:an, data=math)
testInEdges(cm1, getEdges(cm1$glist))
testOutEdges(cm1, getEdges(cm1$glist, ingraph=FALSE))
# }
Run the code above in your browser using DataLab